﻿using System.ComponentModel.DataAnnotations;

namespace YiSha.Core.DynamicData;

public class OriginalProperty
{
    [Key]
    public string Id { get; set; }
    public OriginalTable Table { get; set; }
    public string TableId { get; set; }
    /// <summary>
    /// 属性名称
    /// </summary>
    public string PropertyName { get; set; }
    /// <summary>
    /// 添加编辑列表显示的名称
    /// </summary>
    public string DisplayName { get; set; }
    /// <summary>
    /// 数据类型
    /// </summary>
    public string DbType { get; set; }
    /// <summary>
    /// 数据最大长度
    /// </summary>
    public int MaxLength { get; set; }
    public object DefaultValue { get; set; }
    /// <summary>
    /// 是否可为空
    /// </summary>
    public bool IsNullable { get; set; }

    /// <summary>
    /// 是否为主键
    /// </summary>
    public bool IsPrimary { get; set; }

    /// <summary>
    /// 是否自增
    /// </summary>
    public bool AutoIncrement { get; set; }
    public int Sort { get; set; }
    public HtmlType HtmlType { get; set; }
}
